<?
		$fieldNames = array("id","Name","Type","Type(a)","Paid","Paid(a)","Start Date","End Date","Reason","Status","Apply Date","PM","PM Approved","PM Approved Date","Admin Approved Date");
		$tableName="leave_absence";
//		$required = "0,1,6,7";

//		$fieldShow[5]["type"]="__SELECT";
		//employee himself
		$fieldEdit[1]["type"]="__SELECT";
		$fieldShow[1] = $fieldEdit[1]["content"] = into_array("emp");
		
		//Project manager
		$fieldEdit[11]["type"]="__SELECT";
		$fieldShow[11] = $fieldEdit[11]["content"] = into_array("emp where jobstatus=0 and id<>".$_SESSION["userid"]." and type=1");
		
		//type of leave
		$fieldEdit[2]["type"]=$fieldEdit[3]["type"]="__RADIO";
		$fieldEdit[2]["content"]=$fieldEdit[3]["content"]=$fieldShow[2]=$fieldShow[3]=array("","Sick Leave","Casual Leave","Annual Leave");
		
		//paid or unpaid
		$fieldEdit[4]["type"]=$fieldEdit[5]["type"]="__RADIO";
		$fieldEdit[4]["content"]=$fieldEdit[5]["content"]=$fieldShow[4]=$fieldShow[5]=array("","Yes","No");
		
		//approved by admin = 9, approved by pm=12
		$fieldEdit[9]["type"]=$fieldEdit[12]["type"]="__RADIO";
		$fieldEdit[9]["content"]=$fieldShow[9]=$fieldEdit[12]["content"]=$fieldShow[12]=array("","Accepted","Deferred","Rejected");
		
		?>